package com.ljx.mq.springboot.hello;

import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class Consumer {

    @RabbitListener(queuesToDeclare = @Queue("helloBoot1"))
    public void consumer(String msg){
        System.out.println("收到的内容：" + msg);
    }
}
